package com.hnas.api.domain;

import java.util.HashMap;
import java.util.Map;
/**
 * 业务返回错误码
 * @author 吴斯音
 *
 */
public class ResultCode {
	public static final String SUCCESS = "00000";//返回结果成功
	public static final String FAIL = "55555";//返回结果失败
	public static final String ERRCODE_10000 = "10000";//系统未知异
	public static final String ERRCODE_10001 = "10001";//参数转换失败-请求参数异常
	public static final String ERRCODE_10002 = "10002";//参数错误
	public static final String ERRCODE_10003 = "10003";//查询返回对象为Null
	public static final String ERRCODE_10004 = "10004";//查询返回对象为Null
	public static final String ERRCODE_10005 = "10005";//查询返回对象为Null
	public static final String ERRCODE_10006 = "10006";//查询返回对象为Null
	public static final String ERRCODE_10007 = "10007";//查询返回对象为Null
	public static final String ERRCODE_10008 = "10008";//查询返回对象为Null
	
	public static final String ERRCODE_30004 = "30004";//卡余额不足
	public static final String ERRCODE_30005 = "30005";//动态密钥和令牌不正确
	public static final String ERRCODE_30006 = "30006";//数据解密失败
	public static final String ERRCODE_50024 = "50024";//密码错误
	public static final String ERRCODE_50027 = "50027";//查询结果为空
	public static final String ERRCODE_50001 = "50001";//
	public static final String ERRCODE_55555 = "55555";//
	public static final String ERRCODE_6000 = "60000";//查询交易记录失败
	public static final String ERRCODE_60001 = "60001";//查询最新员工卡号失败,输入员工号为空
	public static final String ERRCODE_60002 = "60002";//查询交易记录失败
	public static final String ERRCODE_60003 = "60003";//查询交易记录失败
	public static final String ERRCODE_60004 = "60004";//
	public static final String ERRCODE_60005 = "60005";//
	public static final String ERRCODE_60006 = "60006";//
	public static final String ERRCODE_60007 = "60007";//
	public static final String ERRCODE_60008 = "60008";//
	public static final String ERRCODE_70000 = "70000";//
	
	public static Map<String, String> map = new HashMap<String, String>();
	static{
		map.put(SUCCESS, "处理成功");
		map.put(FAIL, "处理成功");
		map.put(ERRCODE_10000, "系统未知异");
		map.put(ERRCODE_10001, "参数转换失败-请求参数异常");
		map.put(ERRCODE_10002, "参数错误");
		map.put(ERRCODE_10003, "查询返回对象为Null");
		map.put(ERRCODE_10004, "ftp获取文件为空！");
		map.put(ERRCODE_10005, "明细文件内容格式不正确！");
		map.put(ERRCODE_10006, "汇总文件内容格式不正确！");
		map.put(ERRCODE_10007, "系统获取数据异常！");
		map.put(ERRCODE_10008, "系统保存数据异常！");
		
		map.put(ERRCODE_30004, "卡余额不足");
		map.put(ERRCODE_50024, "密码错误");
		map.put(ERRCODE_50027, "查询结果为空");
		map.put(ERRCODE_6000, "查询交易记录失败");
		map.put(ERRCODE_60001, "查询最新员工卡号失败,输入员工号为空");
		map.put(ERRCODE_60002, "查询最新员工卡号,结果为空");
		map.put(ERRCODE_60003, "查询最新员工卡号失败,异常:");
		map.put(ERRCODE_60004, "同步核心交易记录异常,异常:");
		map.put(ERRCODE_60005, "查询最新员工卡号失败,异常:");
		map.put(ERRCODE_60006, "查询最新员工卡号失败,异常:");
		map.put(ERRCODE_60007, "查询最新员工卡号失败,异常:");
		map.put(ERRCODE_60008, "查询最新员工卡号失败,异常:");
		
		map.put(ERRCODE_70000, "接口调用异常");
	}

	public static String getErrMsg(String key){
		return map.get(key);
	}

	public static Map<String, String> getErrMsgMap(){
		return map;
	}
}
